<template>
  <el-dialog :model-value="dialogStore.dialogVisible"
             :close-on-click-modal="false"
             :before-close="dialogStore.handleClose"
             title="登录获取更多权益"
             style="border-radius: 5px;  max-width: 100%;width: max-content;"
             width="100%"
             :lock-scroll="false"
  >
    <div  v-if="dialogStore.dialogValue==='login'" > <login  @update:dialog="(newVal)=>{dialogStore.dialog(newVal)}"></login></div>
    <div  v-if="dialogStore.dialogValue==='register'" > <register  @update:dialog="(newVal)=>{dialogStore.dialog(newVal)}" ></register></div>
    <div  v-if="dialogStore.dialogValue==='forget'" > <forget @update:dialog="(newVal)=>{dialogStore.dialog(newVal)}" ></forget></div>
    <div  style="text-align: center; " ><span >登录注册即表示同意<span style="color:#40a9ff;" >用户协议</span></span></div>
  </el-dialog>
</template>
<script setup >
import {defineComponent} from "vue";
import Login from "@/views/auth/login.vue";
import Forget from "@/views/auth/forget.vue";
import Register from "@/views/auth/register.vue";
import {useDialogStore} from "@/store/index/dialog";
const dialogStore = useDialogStore();
defineComponent({
  components: {Register, Forget, Login}
})
</script>
